<h1>Packages</h1>
<table>
<tr>
<td><a href="jascript:void(0);">Choose</a></td>
<td width="100px"></td>
<td><a  href="jascript:void(0);">Confirm</a></td>
<td width="100px"></td>
<td><a href="jascript:void(0);">Pay</a></td>
</tr>
</table>
<br /><br />
<table>
<tr>
<td>
Package1
</td>
<td width="50px">
</td>
<td>
100
</td>
<td width="50px">
</td>
<td>
<a href="javascript:void(0);" onclick="addToConfirm('Package1','$100')">Buy</a>
</td>
</tr>
<tr>
<td>
Package2
</td>
<td width="50px">
</td>
<td>
200
</td>
<td width="50px">
</td>
<td>
<a href="javascript:void(0);" onclick="addToConfirm('Package2','$200')">Buy</a>
</td>
</tr>
<tr>
<td>
Package3
</td>
<td width="50px">
</td>
<td>
300
</td>
<td width="50px">
</td>
<td>
<a href="javascript:void(0);" onclick="addToConfirm('Package3','$300')">Buy</a>
</td>
</tr>
<tr>
<td>
Package4
</td>
<td width="50px">
</td>
<td>
400
</td>
<td width="50px">
</td>
<td>
<a href="javascript:void(0);" onclick="addToConfirm('Package4','$400')">Buy</a>
</td>
</tr>
<tr>
<td>
Package5
</td>
<td width="50px">
</td>
<td>
500
</td>
<td width="50px">
</td>
<td>
<a href="javascript:void(0);" onclick="addToConfirm('Package5','$500')">Buy</a>
</td>
</tr>
</table>
<script>
function addToConfirm(packageName,value){
	$.ajax({
	type:'POST',
	url:   '/add-cart',
	data:{packageName:packageName,value:value},
	success: function(data){
		if(data.output=='success'){
			window.location="/confirm";
		}
	}
});
}
</script>